/**
 * @see [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/api/wxml-nodes-info.html#nodesreffieldsfieldscallback)
 */

export default function fields(nodes_ref: wx.NodesRef, id?: boolean, dataset?: boolean, rect?: boolean, size?: boolean, scrollOffset?: boolean, properties?: string[]) {
	return new Promise<any>((resolve) => {
		nodes_ref.fields({
			dataset,
			id,
			properties,
			rect,
			scrollOffset,
			size
		}, (res) => {
			resolve(res);
		}).exec();
	});
}
